using System.Data.Entity;
using System.Data.Entity.Infrastructure;
using DataWinner.Entity.Nba_Sina.Models.Mapping;

namespace DataWinner.Entity.Nba_Sina.Models
{
    public partial class Nba_SinaContext : DbContext
    {
        static Nba_SinaContext()
        {
            Database.SetInitializer<Nba_SinaContext>(null);
        }

        public Nba_SinaContext()
            : base("Name=Nba_SinaContext")
        {
        }

        public DbSet<Match_Sina> Match_Sina { get; set; }
        public DbSet<OnlineUser_Sina> OnlineUser_Sina { get; set; }
        public DbSet<sysdiagram> sysdiagrams { get; set; }
        public DbSet<Team_Sina> Team_Sina { get; set; }
        public DbSet<TeamStat_Sina> TeamStat_Sina { get; set; }
        public DbSet<TeamStatAvg_Sina> TeamStatAvg_Sina { get; set; }
        public DbSet<TeamStatDaily_Sina> TeamStatDaily_Sina { get; set; }
        public DbSet<MatchWithTeam> MatchWithTeams { get; set; }

        protected override void OnModelCreating(DbModelBuilder modelBuilder)
        {
            modelBuilder.Configurations.Add(new Match_SinaMap());
            modelBuilder.Configurations.Add(new OnlineUser_SinaMap());
            modelBuilder.Configurations.Add(new sysdiagramMap());
            modelBuilder.Configurations.Add(new Team_SinaMap());
            modelBuilder.Configurations.Add(new TeamStat_SinaMap());
            modelBuilder.Configurations.Add(new TeamStatAvg_SinaMap());
            modelBuilder.Configurations.Add(new TeamStatDaily_SinaMap());
            modelBuilder.Configurations.Add(new MatchWithTeamMap());
        }
    }
}
